<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8"/>
    <title>Vue示例</title>
</head>

<body>
<div id="app">
    <child-component></child-component>
</div>
<script charset="utf-8" src="../js/vue.min.js" type="text/javascript"></script>
<script type="text/javascript">
    Vue.component('child-component', function (resolve, reject) {
        window.setTimeout(function () {
            resolve({
                template: '<div>我是异步渲染的</div>'
            });
        }, 2000);
    });
    var app = new Vue({
        el: '#app'
    })
</script>
</body>

</html>